package com.xinchen.quartz.core.test.QuartzManage;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;

import java.util.Date;

/**
 * Description:
 *
 * @author xinchen (xinchenmelody@gmail.com)
 * @date 2016/12/24 20:32.
 * @see 2016/12/24 20:32 Created
 ****************************************/

public class MyJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try {
            System.out.println("{" + new Date() + "}:" + "Job Start ----" + jobExecutionContext.getScheduler().getSchedulerName()
                    + "===" + Thread.currentThread());
        } catch (SchedulerException e) {
            e.printStackTrace();
        }
    }
}
